class UserQuery:
    def __init__(self, user_id=None, password=None, name=None, sex=None,
                 birthday=None, phone=None, email=None, position=None):
        self.user_id = user_id
        self.password = password
        self.name = name
        self.sex = sex
        self.birthday = birthday
        self.phone = phone
        self.email = email
        self.position = position

    def to_dict(self):
        return {
            "user_id": self.user_id,
            "name": self.name,
            "sex": self.sex,
            "birthday": self.birthday.strftime('%Y-%m-%d') if self.birthday else None,
            "phone": self.phone,
            "email": self.email,
            "position": self.position,
        }
